Skip to content

fix(CommentComposer): the agent command menu words its rows through the catalog - #13739

Open
ernestt wants to merge 1 commit into
fix/comment-composer-onclickfrom
fix/comment-composer-agent-menu-i18n
Open

ernestt wants to merge 1 commit into
fix/comment-composer-onclickfrom
fix/comment-composer-agent-menu-i18n

Conversation

@ernestt

@ernestt ernestt commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #13738 (the previous Comments fix) only so the Comments move includes it. It touches none of CommentPin's files. On main it applies on top of #13738; on its own, only its new test collides with #13738's new test next to it in CommentComposer.test.tsx.

User impact

A viewer in any locale but English who types / in a comment composer sees the agent-command menu partly in English. Each row's usage line (/ask <prompt>) and summary (Release Assistant · Ask about the rollout) were built in code, so the placeholder word and the separator could not be translated or reordered.

Problem and solution fit

  1. Why is it English? The menu assembled both lines with string concatenation, outside the catalog.
  2. Why does it harm the task? The usage line tells the viewer what to type after the command. An untranslated placeholder hides that, and a fixed separator cannot follow a locale's punctuation.
  3. Why does it matter? architecture:internationalization requires that every word a component shows comes from the catalog. Core's strict lint enforces it, so the family could not graduate with this.

Two catalog messages now word the rows: @astryx.commentComposer.agentCommandUsage (/{command} '<prompt>', with the angle brackets quoted for the message format) and @astryx.commentComposer.agentCommandSummary ({name} · {description}). English output is unchanged.

Expected behavior and authority

  • architecture:internationalization: components take user-facing text from the catalog. A locale can reorder or re-punctuate an assembled string only when one message holds it.
  • Component audit rubric BLOCK I1 (graduation issue list): the agent-command menu builds text in code. It was confirmed in the source on main.

Smallest restoration

  • packages/core/locales/en.json gains the two messages, with translator descriptions. A Core changeset names the catalog change.
  • CommentComposer renders each row through a small component that calls the translator.

No API, visual, or other behavior change. English text is identical.

Evidence

  • Reproduction before the change: with a French override for both keys, typing / still shows /ask <prompt>.
  • Result after the change: the override applies: /ask <demande>.
  • Representative unchanged path: English shows /ask <prompt> and Release Assistant · Ask about the rollout, as before.
  • Regression test: CommentComposer.test.tsx "words the agent command menu through the catalog". It fails without the fix.
  • check:i18n-catalog and generate-i18n-runtime --check pass with the new keys.

The rows look the same in English, so there are no screenshots.

Scope

Components: CommentComposer

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run packages/lab/src/Comments: pass. The new case fails without the fix.

  • node scripts/check-i18n-catalog.mjs and node scripts/generate-i18n-runtime.mjs --check: pass.

  • pnpm review:pre: 0 findings. pnpm check:changesets: valid. prettier and eslint on the changed files: clean.

  • Rebased onto main at 2608fe4, with the pull requests below this one, with no change to its own diff (the same patch ID as before the rebase). Repeated on this head: vitest run packages/lab/src/Comments: 102 passed. pnpm review:pre: 0 findings. check:i18n-catalog and check:i18n-runtime: pass.

@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Dec 2, 2026 5:10am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Dec 2, 2026, 5:21 AM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one line in the changeset needs a fix.

  • The changeset (.changeset/comment-composer-agent-menu-catalog.md, line 5) gives @astryx.commentComposer.agentCommandUsage as "/{command} <prompt>", but en.json ships "/{command} '<prompt>'", and the unquoted form fails to parse (UNCLOSED_TAG) when someone copies it into overrides or a translation, so please quote the shipped message or describe the English output instead.

The row component, the two catalog entries and the regression test follow the internationalization contract, and the English rows are unchanged. CI has not run on this head yet; it runs once the pull request targets main.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claims:
    • Changeset: both lines of each agent row come from two catalog messages: verified (CommentComposer.tsx:131-141, en.json:2342-2349).
    • Changeset: the usage message is /{command} <prompt>: false (en.json:2343 ships /{command} '<prompt>').
    • Changeset: the summary message is {name} · {description}: verified (en.json:2347).
    • Changeset and description: a locale can translate the placeholder word and the separator: verified (new test, CommentComposer.test.tsx:130-164).
    • Changeset and description: English output is unchanged: verified (both messages format to the previous strings).
    • Description: the rows were built in code, also on main: verified (CommentComposer.tsx:131, :133 before this change).
    • Description: the angle brackets are quoted for the message format, and both messages carry translator descriptions: verified (en.json:2342-2349).
    • Description: each row renders through a small component that calls the translator: verified (CommentComposer.tsx:119-151).
    • Description: no API, visual or other behavior change, and no CommentPin file touched: verified.
    • Description: the regression test fails without the fix: verified by reading (the previous code renders literals, so the override cannot appear).
    • Description: the catalog check and the runtime-catalog check pass: verified at this head.
    • Description: the Comments tests, the pre-review checklist, the changeset check, Prettier and ESLint pass: not verified (CI has not run at this head).
  • Files:
    • .changeset/comment-composer-agent-menu-catalog.md: the finding above.
    • packages/core/locales/en.json: clear.
    • packages/lab/src/Comments/CommentComposer.test.tsx: clear.
    • packages/lab/src/Comments/CommentComposer.tsx: clear.

Automated review (maintainer link)

@ernestt
ernestt force-pushed the fix/comment-composer-onclick branch from 26286ae to 6fb0bbf Compare November 24, 2026 18:45
@ernestt
ernestt force-pushed the fix/comment-composer-agent-menu-i18n branch from e851898 to 088eaa8 Compare November 24, 2026 18:46
@ernestt

ernestt commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Line 5 of the changeset now quotes the shipped message: "/{command} '<prompt>'".

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet. It runs once this pull request targets main.

The earlier finding is fixed: the changeset now quotes the shipped agentCommandUsage message, "/{command} '<prompt>'". Both lines of each agent row now come from one catalog message each, the English rows are unchanged, and the new test shows a non-English override reaching both lines.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims:
    • Changeset: both lines of each agent row come from two catalog messages: verified (CommentComposer.tsx:131-141, en.json:2342-2349).
    • Changeset: the usage message is "/{command} '<prompt>'" and the summary "{name} · {description}": verified (en.json:2343, :2347).
    • Changeset and description: a locale can translate the placeholder word and the separator: verified (CommentComposer.test.tsx:130-164 overrides both; overrides resolve first in resolve.ts).
    • Changeset and description: English output is unchanged: verified by reading (the quoted brackets format as <prompt>; the summary formats to the old string).
    • Description: it sits on #13738 and touches none of CommentPin's files: verified (the base branch is #13738's head; four files change).
    • Description: applied to main alone, only the new test collides with #13738's test: verified (a three-way merge onto main conflicts only in CommentComposer.test.tsx).
    • Description: the rows were assembled in code, also on main: verified (CommentComposer.tsx:131, :133 before this change).
    • Description: the internationalization contract requires catalog text and Core's strict lint enforces it: verified (architecture:internationalization INV1a; eslint.config.js:404-426 scopes the rule to Core and richtext, not Lab, and it skips punctuation-only chunks).
    • Description: the component audit's graduation list names this blocker: not verifiable here (outside the repository).
    • Description: the angle brackets are quoted, both messages carry translator descriptions, and a Core changeset names the change: verified.
    • Description: each row renders through a small component that calls the translator: verified (CommentComposer.tsx:119-151).
    • Description: no API, visual or other behavior change: verified (no export or prop changes; the row markup is the same).
    • Description: the reproduction, the result with an override, and the test failing without the fix: verified by reading (the old code renders literals).
    • Description: the catalog check and the runtime-catalog check pass: verified by reading only (both entries have a string message and a description, and the ICU parses); not executed.
    • Description: the changeset check passes: verified by reading (a public package, a [fix] tag and a credited author).
    • Description: the Comments tests, the pre-review checklist, Prettier and ESLint pass, validated on an earlier main: not verified (not executed here; CI has not run).
  • Files:
    • .changeset/comment-composer-agent-menu-catalog.md: clear.
    • packages/core/locales/en.json: clear.
    • packages/lab/src/Comments/CommentComposer.test.tsx: clear.
    • packages/lab/src/Comments/CommentComposer.tsx: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet. It runs once this pull request targets main.

Both lines of each agent row now come from one catalog message each, English rows are unchanged, and a French override or catalog reaches both lines. Reproduced locally, the new test fails without the change and passes with it.

Claims and files checked

Review mode: full; reason: recipe-changed (many rules)

  • Claims:
    • Title: the agent command menu words its rows through the catalog: verified (CommentComposer.tsx:131-141; the new test fails without the change and passes with it, reproduced locally).
    • Changeset: the catalog words both lines of each agent row: verified (the test asserts both lines, CommentComposer.test.tsx:162-163).
    • Changeset: the two messages and their English text: verified (en.json:2343, :2347).
    • Changeset and description: a locale can translate the placeholder word and the separator: verified (reproduced locally through a provider override and through a French catalog that also reorders the summary).
    • Changeset, description and commit: English output is unchanged: verified (reproduced locally: identical row text on the base and the head with no provider and under English, French and Arabic providers, for names and descriptions holding message syntax and an empty description; identical row markup and identical English screenshots).
    • Description: stacked on #13738 and touching none of CommentPin's files: verified (the base branch is #13738's head; four files change).
    • Description: on main it applies on top of #13738, and alone only its new test collides: verified against current main (alone, the only conflict is CommentComposer.test.tsx; with the branch below, the only conflicts are in two files of the pull requests below).
    • Description: the rows were built in code, also on main: verified (CommentComposer.tsx:131, :133 on the base and on main).
    • Description: the internationalization contract requires catalog text: accurate for Astryx-owned text; caller copy such as the agent's name and description stays outside it.
    • Description: Core's strict lint would keep the family from moving with this code: verified (reproduced locally: with this file under Core, strict lint errors on the usage line at :131; it does not flag the summary template at :133).
    • Description: the component audit's issue list names this blocker: reported (outside the repository); the source half verified.
    • Description: two messages with translator descriptions, quoted angle brackets, and a Core changeset: verified (en.json:2342-2349, the changeset).
    • Description: each row renders through a small component that calls the translator: verified (CommentComposer.tsx:119-151).
    • Description: no API, visual or other behavior change: verified (the API surface comparison of both builds lists no change; English markup and screenshots are identical).
    • Description: the reproduction before, the result after, and the regression test failing without the fix: verified (reproduced locally).
    • Description: the catalog check and the runtime check pass: verified (reproduced locally).
    • Description: the Comments tests pass, the changeset check is valid, and Prettier is clean: verified (reproduced locally: 4 files, 101 tests).
    • Description: ESLint is clean on the changed files: reported; locally, 0 errors and one warning on an unchanged line (CommentComposer.test.tsx:24).
    • Description: the pre-review checklist has 0 findings, and the change was validated on main with the pull requests below: reported.
  • Files:
    • .changeset/comment-composer-agent-menu-catalog.md: clear.
    • packages/core/locales/en.json: clear.
    • packages/lab/src/Comments/CommentComposer.test.tsx: clear.
    • packages/lab/src/Comments/CommentComposer.tsx: clear.

Automated review (maintainer link)

…he catalog

The `/` menu built each agent's usage line, `/ask <prompt>`, and its
summary, `name · description`, in code, so the placeholder word and the
separator stayed English in every locale. Two catalog messages,
`@astryx.commentComposer.agentCommandUsage` and
`@astryx.commentComposer.agentCommandSummary`, now word them. English output
is unchanged.
@ernestt

ernestt commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main at 2608fe4 with the rest of the stack. This pull request's own diff is unchanged: its patch ID is the same as before the rebase, and it applied without conflicts. In the stack, only #13737 changed in content; #13702, #13735, #13736, #13738, #13739, #13740 and #13741 are unchanged apart from the rebase.

Repeated on this head: vitest run packages/lab/src/Comments: 102 passed. pnpm review:pre: 0 findings. check:i18n-catalog and check:i18n-runtime: pass.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet. It runs once this pull request targets main.

Both lines of each agent row now come from one catalog message each, English rows are unchanged, and a French catalog or override reaches both lines. Reproduced locally, the new test fails without the change and passes with it.

Claims and files checked

Review mode: full; reason: author-not-engowner

  • Claims:
    • Title: the agent command menu words its rows through the catalog: verified (CommentComposer.tsx:131-141; the new test fails without the change and passes with it, reproduced locally).
    • Changeset: the catalog words both lines of each agent row: verified (the test asserts both lines, CommentComposer.test.tsx:162-163).
    • Changeset: the two messages and their English text: verified (en.json:2375, :2379).
    • Changeset and description: a locale can translate the placeholder word and the separator: verified (reproduced locally through a provider override that also reorders the summary, and through a French catalog).
    • Changeset and description: English output is unchanged: verified (reproduced locally: identical row text on the base and the head with no provider and under English, French and Arabic providers, for names and descriptions holding message syntax, an empty description and right-to-left text; identical row markup and pixel-identical English screenshots).
    • Changeset: a Core patch release note: verified (check:changesets passes, reproduced locally).
    • Description: stacked on #13738 and touching none of CommentPin's files: verified (the base branch is #13738's head; four files change).
    • Description: on main it applies on top of #13738, and alone only its new test collides: verified against current main (with the branch below it merges cleanly; alone, the only conflict is CommentComposer.test.tsx).
    • Description: the rows were built in code, also on main: verified (CommentComposer.tsx:131, :133 on the base and on main).
    • Description: the internationalization contract requires catalog text: accurate for Astryx-owned text; caller copy such as the agent's name and description stays outside it.
    • Description: Core's strict lint would keep the family from moving with this code: verified (reproduced locally: with this file under Core, strict lint errors on the usage line at :131; it does not flag the summary's separator at :133).
    • Description: the component audit's issue list names this blocker: reported (outside the repository); the source half verified.
    • Description: two messages with translator descriptions, quoted angle brackets, and a Core changeset: verified (en.json:2374-2381, the changeset).
    • Description: each row renders through a small component that calls the translator: verified (CommentComposer.tsx:119-151).
    • Description: no API, visual or other behavior change: verified (the API surface comparison of both builds lists no change; English markup and screenshots are identical).
    • Description: the reproduction before, the result after, the unchanged English path and the regression test failing without the fix: verified (reproduced locally).
    • Description: no screenshots because English rows look the same: verified (the English frames are pixel-identical, reproduced locally).
    • Description: the scope checklist, including no internal context in public text: verified (no residue in the added lines, title, body, branch or commit message).
    • Description: the catalog check and the runtime check pass: verified (reproduced locally).
    • Description: the Comments tests pass, 102 on this head, and Prettier is clean: verified (reproduced locally: 4 files, 102 tests).
    • Description: ESLint is clean on the changed files: reported; locally, 0 errors and one warning on an unchanged line (CommentComposer.test.tsx:24).
    • Description: the pre-review checklist has 0 findings: reported.
    • Description: rebased onto main with the pull requests below, with its own patch unchanged: verified (the commit's patch is identical to the earlier head's).
  • Files:
    • .changeset/comment-composer-agent-menu-catalog.md: clear.
    • packages/core/locales/en.json: clear.
    • packages/lab/src/Comments/CommentComposer.test.tsx: clear.
    • packages/lab/src/Comments/CommentComposer.tsx: clear.

Automated review (maintainer link)

This branch was successfully deployed

1 active deployment
Preview — 013414e9 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant